package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class NullCallClause implements AlterRoutineCharacteristic, MethodCharacteristic, RoutineCharacteristic {

    private int beginIndex;
    private int endIndex;
    private boolean returnsNullOnNullInput;
    private boolean calledOnNullInput;

    public NullCallClause(int beginIndex,
                          int endIndex,
                          boolean returnsNullOnNullInput,
                          boolean calledOnNullInput) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.returnsNullOnNullInput = returnsNullOnNullInput;
        this.calledOnNullInput = calledOnNullInput;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public boolean isReturnsNullOnNullInput() {
        return returnsNullOnNullInput;
    }

    public boolean isCalledOnNullInput() {
        return calledOnNullInput;
    }

}
